try:
    print(1/0)
except:  #捕获一个异常
    print('ZeroDivisionError 这个歌错误')


try:
    print(1 / 0)
    print("123"[100])
except (ZeroDivisionError,IndexError)  as e:  #捕获多个异常
    print(e)

try:
    print('走else条件')
except Exception as e:
    print(f"您的异常情况是这样的:{e}")
else:
    print("程序正常执行,没问题呀")
finally:
    print("天天向上")


def fun1():
    print(1/0)
def fun2():
    fun1()
def fun3():
    fun2()
def main():
    try:
        fun3()
    except:
        print("由于异常具有传递性,所以被我捕获住了")

main()

import random   #嘿,哥哥,关关难过关关过,你不是最擅长逆风翻局吗
print(random.randint(1,5))

from  random  import randint
print(randint(1,5))

from random import *  #这个方法号,可以省略模块名

print(randrange(1,5))



# import day0902模块导入案列

from day0902模块导入案列 import *
print(sum(1,2))

from day0902模块导入案列 import say
print(say())


#包案例
from pk_hello import *
print(day041301.count01(1,2))

